import request from '@/utils/request'

// 发布评论
export const createComment = (data: { publish_id: number; content: string; reply_to_comment_id?: number }) => {
  return request({
    url: '/publish/comment/create',
    method: 'POST',
    data
  })
}

// 删除评论
export const deleteComment = (data: { comment_id: number }) => {
  return request({
    url: '/publish/comment/delete',
    method: 'POST',
    data
  })
}

// 获取评论列表
export const getCommentList = (data: { publish_id: number; page?: number; limit?: number }) => {
  return request({
    url: '/publish/comment/list',
    method: 'POST',
    data
  })
}